package com.xyazm.common.enums;

import lombok.Getter;

/**
 * mq 相关 topic 配置
 * @Author: xuyou
 * @Date: 2022/7/25 17:39
 */
@Getter
public enum RocketMqTopicEnum {

    ORDER_DEFAULT_PRODUCER_GROUP(null,null,"order_default_producer_group"),

    /**
     * 支付订单超时自动关单
     */
    PAY_ORDER_TIMEOUT_DELAY("pay_order_timeout_delay_topic","pay_order_timeout_delay_consumer_group"),

    /**
     * 订单正向标准变更消息
     */
    ORDER_STATE_CHANGE_EVENT("order_status_change_event_topic","order_status_change_event_consumer_group"),

    /**
     * 释放资产 ok
     */
    RELEASE_ASSETS("release_assets_topic","release_assets_consumer_group"),

    /**
     * 准备退款 ok
     */
    CANCEL_REFUND("cancel_refund_topic","cancel_refund_consumer_group"),

    /**
     * 实际退款 ok
     */
    ACTUAL_REFUND("actual_refund_topic","actual_refund_consumer_group","actual_refund_producer_group"),

    /**
     * 取消订单/客服审核售后通过后,释放库存 ok
     */
    RELEASE_INVENTORY("release_inventory_topic","release_inventory_consumer_group"),

    /**
     * 取消订单/订单售后 释放优惠券 ok
     */
    RELEASE_COUPON("release_coupon_topic","release_coupon_consumer_group","release_coupon_producer_group"),

    /**
     * 订单支付成功 ok
     */
    PAID_ORDER_SUCCESS("paid_order_success_topic","paid_order_success_consumer_group","paid_order_success_producer_group"),

    /**
     * 触发订单履约 ok
     */
    TRIGGER_ORDER_FULFILL("trigger_order_fulfill_topic","trigger_order_fulfill_consumer_group","trigger_order_fulfill_producer_group"),

    /**
     * 售后申请发送给客服审核 ok
    */
    AFTER_SALE_CUSTOMER_AUDIT("after_sale_customer_audit_topic","after_sale_customer_audit_consumer_group"),

    /**
     * 客服审核通过后,释放资产 ok
    */
    CUSTOMER_AUDIT_ACCEPT_RELEASE_ASSETS_TOPIC("customer_audit_accept_release_assets_topic",
            "customer_audit_accept_release_assets_consumer_group","customer_audit_accept_release_assets_producer_group"),

    /**
     * 正向订单物流配送结果 ok
     */
    WMS_SHIP_RESULT("wms_ship_result_topic","wms_ship_result_consumer_group"),

   ;


    RocketMqTopicEnum(String topic, String consumerGroup) {
        this.topic = topic;
        this.consumerGroup = consumerGroup;
    }

    RocketMqTopicEnum(String topic, String consumerGroup,String producerGroup) {
        this.topic = topic;
        this.consumerGroup = consumerGroup;
        this.producerGroup = producerGroup;
    }


    private String topic;
    private String consumerGroup;
    private String producerGroup;





}
